mcp_class = function () {
    this.$container = $('#Container');
}

mcp_class.prototype.initPageEvents = function () {
    var self = this;

    self.initSlider();

    // Navigation sorting
    $('ul.nav-bar li a').click(function () {
        var selector = $(this).attr('data-filter');
        self.$container.isotope({ filter: selector });
        return false;
    });

    self.initWindowResizeEvents();

    self.$container.isotope({
        // options
        itemSelector: '.widget',
        filter: '.all',
        layoutMode: 'fitRows'
    });

    mcp.$container.isotope('reLayout')
}

mcp_class.prototype.initSlider = function () {
     $('#slider').orbit();
   
}

mcp_class.prototype.initWindowResizeEvents = function () {
    var self = this;

    $(window).resize(function () {
        self.$container.isotope('reLayout')
    });
}

mcp_class.prototype.reLayout = function (fCallback) {
    mcp.$container.isotope('reLayout', fCallback)
}

// Keep at the bottom
$(document).ready(function () {
    mcp = new mcp_class();
    mcp.initPageEvents();
});